﻿using 订单处理系统.Entity;
using 订单处理系统.Model;

namespace 订单处理系统.Repository
{
    public class UserRepository
    {
        private OrderDbContext _db;

        public UserRepository(OrderDbContext db)
        {
            _db = db;
        }

        public async Task Add(User user)
        {
            _db.Users.Add(user);
            await _db.SaveChangesAsync();
            return;
        }

        public async Task Update(User user)
        {
            _db.Users.Update(user);
            await _db.SaveChangesAsync();
            return;
        }
    }
}